package com.vcredit.creditcat.enumtype.hl;

public enum EducationEnum {
	MASTER(1, "NEWEDUCATION/SSJYS", "硕士及以上"), 
	UNDERGRADUATE(2, "NEWEDUCATION/BK", "大学本科"),
	SENIOR(3, "NEWEDUCATION/DZ","大专"), 
	JUNIOR(4, "NEWEDUCATION/ZK", "中专"), 
	MIDDLE(5, "NEWEDUCATION/GZ", "高中及以下");
	private Integer code;
	private String type;
	private String desc;

	private EducationEnum(Integer code, String type, String desc) {
		this.code = code;
		this.type = type;
		this.desc = desc;
	}

	public String getType() {
		return type;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public static String getEducationName(String desc) {
		for (EducationEnum obj : EducationEnum.values()) {
			if (desc== obj.getDesc()) {
				return obj.getType();
			}
		}
		return MIDDLE.getType();
	}
}
